from SpongeExt import enhanced_sponge

import pysages
from pysages.colvars import DihedralAngle
from pysages.methods import Metadynamics

def phi_psi():
    from numpy import pi
    cvs = [DihedralAngle([4, 6, 8, 14]), DihedralAngle([6, 8, 14, 16])]
    height = 5.0  # kJ/mol
    sigma = [0.4, 0.4]  # radians
    stride = 3
    ngauss = 500
    grid = pysages.Grid(lower=(-pi, -pi), upper=(pi, pi), shape=(50, 50), periodic=True)
    method = Metadynamics(cvs, height, sigma, stride, ngauss, grid=grid)
    return method

pysages_method = phi_psi()
Calculate_Force, Mdout_Print = enhanced_sponge(pysages_method)
